home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / misc / medical / mendelge.cpt / MendelGenetics / MENDELIAN GENETICS I / card_77381.txt < prev    next >
Text File  |  1989-06-13  |  5KB  |  199 lines

  1. -- card: 77381 from stack: in
  2. -- bmap block id: 122035
  3. -- flags: 0000
  4. -- background id: 2665
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0002
  11. -- rect: left=271 top=260 right=284 bottom=338
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Toss
  20.  
  21.  
  22. -- part 2 (field)
  23. -- low flags: 00
  24. -- high flags: 0002
  25. -- rect: left=348 top=260 right=284 bottom=415
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 0
  29. -- font id: 3
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: heads
  34.  
  35.  
  36. -- part 3 (field)
  37. -- low flags: 00
  38. -- high flags: 0002
  39. -- rect: left=420 top=260 right=284 bottom=487
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 0
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 0
  46. -- line height: 16
  47. -- part name: tails
  48.  
  49.  
  50. -- part 4 (field)
  51. -- low flags: 00
  52. -- high flags: 0002
  53. -- rect: left=317 top=307 right=331 bottom=384
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 0
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: percent
  62.  
  63.  
  64. -- part 5 (button)
  65. -- low flags: 00
  66. -- high flags: 8003
  67. -- rect: left=275 top=230 right=252 bottom=375
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: ACTIVATE
  76. ----- HyperTalk script -----
  77. on mouseUp
  78.   global flip
  79.   global it
  80.   repeat 100 times
  81.     add 1 to card field toss
  82.     put the random of 2 into flip
  83.     if flip = 1 then add 1 to card field heads else add 1 to card field tails
  84.     put the value of ((card field heads / card field toss) * 100)into card field percent
  85.     choose pencil tool
  86.     set linesize to 1
  87.     set the numberFormat to "000"
  88.     put (200 - (200 * ( the value of card field percent / 100))) into it
  89.     click at 300 + (card field toss), trunc (it)
  90.     set the numberFormat to ".00"
  91.   end repeat
  92.   choose browse tool
  93. end mouseUp
  94.  
  95.  
  96.  
  97. -- part 6 (button)
  98. -- low flags: 00
  99. -- high flags: 8003
  100. -- rect: left=385 top=231 right=253 bottom=485
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 1
  104. -- font id: 0
  105. -- text size: 12
  106. -- style flags: 0
  107. -- line height: 16
  108. -- part name: CLEAR
  109. ----- HyperTalk script -----
  110. on mouseUp
  111.   put 0 into card field toss
  112.   put 0 into card field heads
  113.   put 0 into card field tails
  114.   put 0 into card field percent
  115.   choose select tool
  116.   drag from 300,21 to 507,200
  117.   doMenu "Pickup"
  118.   choose browse tool
  119. end mouseUp
  120.  
  121.  
  122.  
  123. -- part 7 (button)
  124. -- low flags: 00
  125. -- high flags: 8003
  126. -- rect: left=205 top=315 right=337 bottom=256
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 0 / 0
  129. -- text alignment: 1
  130. -- font id: 0
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: NEXT
  135. ----- HyperTalk script -----
  136. on mouseUp
  137.   go to next card
  138. end mouseUp
  139.  
  140.  
  141.  
  142. -- part 8 (button)
  143. -- low flags: 00
  144. -- high flags: 8003
  145. -- rect: left=149 top=314 right=337 bottom=199
  146. -- title width / last selected line: 0
  147. -- icon id / first selected line: 0 / 0
  148. -- text alignment: 1
  149. -- font id: 0
  150. -- text size: 12
  151. -- style flags: 0
  152. -- line height: 16
  153. -- part name: PREV.
  154. ----- HyperTalk script -----
  155. on mouseUp
  156.   go back
  157. end mouseUp
  158.  
  159.  
  160.  
  161. -- part contents for background part 1
  162. ----- text -----
  163. COIN TOSS
  164.  
  165. -- part contents for background part 2
  166. ----- text -----
  167. Although simple in concept, the coin toss exercise can reveal some interesting relationships in the world of statistics. When activated, the program will run through 100 coin tosses. Clicking on the activate button a second time will continue the program for another one hundred tosses. How long does it take to reach 50% probability of heads or tails appearing?  How many tosses constitutes a statistically significant number? If after two tosses the percent of heads is 50% does that confirm the hypothesis that the probability of heads appearing is indeed 50%? Write your responses below and then scroll down to see the answers.
  168. ANSWERS:
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177. Answer #1. A 50% probability could be reached after two tosses. However after the third toss,the value will either be 66% or 33%... too far from the expected value to draw any conclusion. Clearly one can only derive a usable hypothesis when the probability remains stable and this occurs only after many tosses.
  178. Answer #2. The wide swings in the percent of heads appearing do not settle down usually until after 40 or so tosses. Even then, some deviation from 50% can be seen. Certainly more than 40 tosses are necessary toe stablish the strong probability that heads will appear 50% of the time.
  179. Answer #3. No it does not because on the very next toss, the probability deviates far from the theoretical value. Only when the variation is minimized can a probability be learned.
  180.  
  181. -- part contents for card part 1
  182. ----- text -----
  183. 110.00
  184.  
  185. -- part contents for card part 3
  186. ----- text -----
  187. 58.00
  188.  
  189. -- part contents for card part 4
  190. ----- text -----
  191. 47.71
  192.  
  193. -- part contents for card part 2
  194. ----- text -----
  195. 52.00
  196.  
  197. -- part contents for background part 8
  198. ----- text -----
  199. 46